package com.bmlstrategys
{
	import com.strategy.IBML;
	import com.utils.Utils;
	
	import flash.utils.ByteArray;
	
	public class AutoMatismInfo extends BMLBase implements IBML
	{
		public var countArr:Array;
		public var mapId:int;
		public var posYArr:Array;
		public var posXArr:Array;
		
		public function AutoMatismInfo(data:ByteArray)
		{
			super(data);
		}
		
		public function bmlstrategyxml():XML
		{
			//把头读掉
			var num:int = Utils.readHead(bmlData);
			var index:int=0;
			var xmlData:XML = new XML();
			xmlData = <root/>;
			
			while(index<num){
				xmlData.appendChild(<maps/>);
				xmlData.maps[index].@mapId = bmlData.readInt();
				xmlData.maps[index].@posXArr =  Utils.readString(bmlData);
				xmlData.maps[index].@posYArr = Utils.readString(bmlData);
				xmlData.maps[index].@countArr = Utils.readString(bmlData);
				index++;
			}
			
			return xmlData;
		}
	}
}